package enumerable;

public interface Enumerable<T> extends java.lang.Iterable<T> {
	public <K> Enumerable<T> select(Selector<T> select);
	
	public <K> Enumerable<K> projectMany(Projector<T, Enumerable<K>> project);
	
	public <K> Enumerable<K> project(Projector<T,K> project);
	
	public T single();
	
	public T single(Selector<T> select);
	
	public T singleOrNull();
	
	public T singleOrNull(Selector<T> select);
	
	public T first();
	
	public T first(Selector<T> select);
	
	public T firstOrNull();
	
	public T firstOrNull(Selector<T> select);
	
	public List<T> toList();
	
	public boolean any(Selector<T> select);
	
	public boolean all(Selector<T> select);
	
	public int count(Selector<T> select);
	
	public int count();
	
	public void forEach(Mapper<T> mapper);
}
